package com.wuyu.mini.dubbo.cluster.config;

import com.wuyu.mini.dubbo.cluster.util.ConfigUtil;

/**
 * dubbo配置信息
 * @author wuyu
 */
public class Config {

    /**
     * 注册协议
     */
    private static String REGISTRY_PROTOCOL_KEY = "mini.dubbo.registry.protocol";
    /**
     * 注册地址
     */
    private static String REGISTRY_ADDRESS_KEY = "mini.dubbo.registry.address";
    /**
     * 负载均衡
     */
    private static String CLUSTER_LOADBALANCE_KEY = "mini.dubbo.cluster.loadBalance";
    /**
     * rpc协议
     */
    private static String RPC_PROTOCOL_KEY = "mini.dubbo.rpc.protocol";

    public static class Registry {
        public static String protocol = ConfigUtil.getInstance().get(REGISTRY_PROTOCOL_KEY);
        public static String address = ConfigUtil.getInstance().get(REGISTRY_ADDRESS_KEY);
    }

    public static class Cluster {
        public static String loadBalance = ConfigUtil.getInstance().get(CLUSTER_LOADBALANCE_KEY);
    }

    public static class Rpc {
        public static String protocol = ConfigUtil.getInstance().get(RPC_PROTOCOL_KEY);
    }

}
